package com.o2o.service;

import com.o2o.dto.ImageHolder;
import com.o2o.dto.ShopExecution;
import com.o2o.entity.Shop;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

/**
 * package_name:com.o2o.service
 * Author:徐亚远
 * Date:2019/11/28 9:53
 * 项目名:o2o
 * Desription:
 **/
public interface ShopService {
    /*
     * @param shopCondition
     * @param pageIndex
     * @param pageSize
     * @return ShopExcution
     * 根据shopCondition分页查询数据
     * */
    ShopExecution getShopList(Shop shopCondition, int pageIndex, int pageSize);

    /*
     * @param Shop
     * @return int
     * 添加店铺
     * */
    int shopInsert(Shop shop);

    /*
     *更新店铺信息,包括对图片的处理
     * @param shop
     * @param shopImg
     * @return
     * @throws ShopOperationException
     * */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail);

    /*
     *@param shopId
     * @return shop
     * 通过shopId查询店铺信息
     * */
    Shop queryByShopId(Long shopId);


    /*
     * 注册店铺信息包括对图片的处理
     * @param shop
     * @param shopImg
     * @param String
     * @return shopExecutio
     * 修改入参，将File类型的入参修改为InputStream,同时增加String类型的文件名称
     * */
    ShopExecution addShop(Shop shop, ImageHolder thumbnail);

    ShopExecution addShop(Shop shop, CommonsMultipartFile shopImg);

    //ShopExecution addShop(File shopFile,Shop shop);
    /*
     * 删除店铺信息通过shopId
     * @param shopId
     *
     * */
    //删除用户通过shopId
    int deleteShop(Long shop_id);
}
